#pragma once
#if (COMM_FEATURE_REGEX==1)

#include "Comm.h"
#include "Buffer.h"

namespace COMM
{
	// Regex
	// NOT MT-safe
	//
	class COMM_API Regex
	{
		MYLIB_NONCOPIED_CLASS(Regex);
	public:
		// flags: '.' can match any character include newline char '\n' while dotCanMatchNewLine is true.
		Regex(const char* content, const char* pattern, bool dotCanMatchNewLine=false);
		~Regex();
		// do it while return true for matching continue.
		bool Match(StringList& groupList);

	private:
		void* m_inst;
	};
}

#endif